﻿using System;
using System.Globalization;

namespace SuppKids.Core.Exceptions
{
    public class EntityNotFoundException : Exception
    {
        public EntityNotFoundException(Type entity)
            : base(string.Format(CultureInfo.InvariantCulture, "{0} can't be found.", entity.Name))
        {
        }

        public EntityNotFoundException(Type entity, int id)
            : base(string.Format(CultureInfo.InvariantCulture, "{0} with id='{1}' can't be found.", entity.Name, id))
        {
        }

        public EntityNotFoundException(Type entity, string identifierName, string identifierValue)
            : base(string.Format(CultureInfo.InvariantCulture, "{0} with {1}='{2}' can't be found.", entity.Name, identifierName, identifierValue))
        {
        }
    }
}